<template>
  <div style="width:100%;height:auto; margin:0 auto;">
    <el-form ref="ruleForm" :model="form" label-width="100px" label-position="left">
      <el-form-item label="星级评价" prop="name">
        <el-rate v-model="form.evaluationScore" show-text :disabled="true" />
      </el-form-item>
      <el-form-item label="留言" prop="name">
        <el-input v-model="form.message" type="textarea" :disabled="true" />
      </el-form-item>
    </el-form>
  </div>
</template>
<script>

import { getInfo } from '@/api/publicFileEvaluate'

export default {
  props: { // 第二种方式
    proid: {
      type: String,
      required: true
    }
  },
  data() {
    return {
      form: {}
    }
  },
  created() {
    this.getDetailed()
  },
  methods: {
    getDetailed() {
      const loading = this.$loading({
        lock: true,
        text: 'Loading',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)'
      })
      getInfo({ code: this.proid }).then(response => {
        this.form = response.data.publicFileEvaluate

        loading.close()
      }).catch(function() {
        loading.close()
      })
    }
  }
}
</script>
